package top.lileix.mybatis.generator.x.db;

import java.util.HashMap;
import java.util.Map;

/**
 * mysql的数据库类型和java是的数据类型转换
 * 
 * @author lilei
 *
 */
public class TypeMapping {

    @SuppressWarnings("serial")
    static protected Map<String, String> map = new HashMap<String, String>() {
	{
	    put("VARCHAR", "String");
	    put("INT", "Integer");
	    put("DATETIME", "java.util.Date");
	    put("DOUBLE", "Double");
	    put("DECIMAL", "java.math.BigDecimal");
	}
    };

    public static String getType(String typeString) {
	return map.get(typeString.toUpperCase());
    }
}
